<?php
defined('_JEXEC') or die;
?>
<div class="mI mSearch">
    <form action="<?php echo JRoute::_('index.php');?>" method="post">        
    	<?php
                $output = '<label for="searchBox">'.$label.'</label><input name="searchword" id="searchBox" maxlength="'.$maxlength.'"  class="inputBox" type="text" size="'.$width.'" value="'.$text.'"  onblur="if (this.value==\'\') this.value=\''.$text.'\';" onfocus="if (this.value==\''.$text.'\') this.value=\'\';" />';
    
                if ($button) :
                    if ($imagebutton) :
                        $button = '<input type="image" value="'.$button_text.'" class="button" src="'.$img.'" onclick="this.form.searchword.focus();"/>';
                    else :
                        $button = '<input type="submit" value="'.$button_text.'" class="button" onclick="this.form.searchword.focus();"/>';
                    endif;
                endif;                    

            ?>
         <?php echo $output;?>
         <?php echo $button;?>
        <input type="hidden" name="task" value="search" />
        <input type="hidden" name="option" value="com_search" />
        <input type="hidden" name="Itemid" value="<?php echo $mitemid; ?>" />
       
    </form>
</div>
